package sampleDataManage

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type SampleDataRouter struct {
}

// InitSampleDataRouter 初始化 SampleData 路由信息
func (s *SampleDataRouter) InitSampleDataRouter(Router *gin.RouterGroup) {
	sampleDataRouter := Router.Group("sampleData").Use(middleware.OperationRecord())
	sampleDataRouterWithoutRecord := Router.Group("sampleData")
	var sampleDataApi = v1.ApiGroupApp.SampleDataManageApiGroup.SampleDataApi
	{
		sampleDataRouter.POST("createSampleData", sampleDataApi.CreateSampleData)             // 新建SampleData
		sampleDataRouter.DELETE("deleteSampleData", sampleDataApi.DeleteSampleData)           // 删除SampleData
		sampleDataRouter.DELETE("deleteSampleDataByIds", sampleDataApi.DeleteSampleDataByIds) // 批量删除SampleData
		sampleDataRouter.PUT("updateSampleData", sampleDataApi.UpdateSampleData)              // 更新SampleData
		sampleDataRouter.POST("getFileLineCount", sampleDataApi.GetFileLineCount)             // 新建SampleData
	}
	{
		sampleDataRouterWithoutRecord.DELETE("findByIds", sampleDataApi.FindByIds) // 根据ID获取
		//sampleDataRouterWithoutRecord.GET("getFileLineCount", sampleDataApi.GetFileLineCount)     // 统计实验人出现次数,用于数据可视化部分绘图
		sampleDataRouterWithoutRecord.GET("getPeopleNameCount", sampleDataApi.GetPeopleNameCount) // 统计实验人出现次数,用于数据可视化部分绘图
		sampleDataRouterWithoutRecord.GET("findSampleData", sampleDataApi.FindSampleData)         // 根据ID获取SampleData
		sampleDataRouterWithoutRecord.GET("getSampleDataList", sampleDataApi.GetSampleDataList)   // 获取SampleData列表
	}
}
